*************************************************************************
*************************************************************************
*							Elusive indeed - 							*
*		the mechanical versus psychological effects of electoral		*
*						rules at the district level						*
*************************************************************************
*	Purpose:		Do-file to replicate all tables 					*
*	File Name:		do_harfst+et+al_tables.do							*
*	Input File:		data_harfst+et+al.dta								*
*************************************************************************
*************************************************************************

use "XXX\data_harfst+et+al", clear
set scheme lean1
set autotabgraphs on
set more off, permanently


***Table 1: Regression Analysis

*(1) H1a & H1b: Strategic entry
xtmixed party_count d_seat if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(2) H2: Effective number of hopeless votes
xtmixed hopeless party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(3) H2: Effective number of losing parties
xtmixed enlop_o party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(4) H2: Coordination product
xtmixed coordination party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(5) H2: Effective number of electoral parties
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(6) H2: Mechanical effect
xtmixed enlp_cst d_seat enep_cst_o if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A1: Descriptive Statistics

*Finland
sum party_count enep_cst_o enlp hopeless enlop_o coordination d_seat_nolog d_seat cleavage if num_reg==1 & iso==246

*Portugal
sum party_count enep_cst_o enlp hopeless enlop_o coordination d_seat_nolog d_seat cleavage if num_reg==1 & iso==620

*All
sum party_count enep_cst_o enlp hopeless enlop_o coordination d_seat_nolog d_seat cleavage if num_reg==1


***Table A2: Replication of model (1) to (3) from main text, excluding Azores and Madeira

*(A1) H1a & H1b: Strategic entry
xtmixed party_count d_seat if unique_id!=37 & unique_id!=38 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A2) H2: Strategic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if unique_id!=37 & unique_id!=38 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A3) H2: Mechanical effect
xtmixed enlp_cst d_seat enep_cst_o if unique_id!=37 & unique_id!=38 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A3: Replication of model (2) from main text: Using three partial cleavage indicators

*(A4) Reproduction model (2): Strategic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A5) Strategic voting: Three cleavage indicators
xtmixed enep_cst_o party_count c.d_seat##c.(het_ur_agrar_mean het_sc_reli_mean het_ow_worker_mean) if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A4: Pearson correlations between regional typology: District magnitude, and cleavage indicators

pwcorr urban_rural d_seat_nolog het_agrar het_reli het_worker cleavage if num_reg == 1, obs sig


***Table A5: Robustness checks for model (2) in main text: Inclusion of OECD's regional typology
*			 (ranging from 1 - predominantly urabn to 5 - predominantly rural remote)

*(A6) Reproduction model (2): Strategic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A7) Strategic voting including urban-rural indicator only
xtmixed enep_cst_o urban_rural_mean if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A8) Strategic voting: Replication of model (2) including urban-rural control
xtmixed enep_cst_o party_count c.d_seat##c.cleavage urban_rural_mean if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A6: Robustness checks for model (2) in main text: Time variant cleavage index

*(A9) Reproduction model (2): Strategic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A10) Strategic voting using time variant cleavage index
xtmixed enep_cst_o party_count c.d_seat##c.het_clv_ind if het_clv_ind != . & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A7: Replication of models (1) to (3) in main text, Finland only

*(A11) H1a & H1b: Strategic entry
xtmixed party_count d_seat if iso == 246 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A12) H2: Strategic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if iso == 246 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A13) H2: Mechanical effect
xtmixed enlp_cst d_seat enep_cst_o if iso == 246 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A8: Replication of models (1) to (3) in main text, Portugal only

*(A14) H1a & H1b: Strategic entry
xtmixed party_count d_seat if iso == 620 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A15) H2: Strategic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if iso == 620 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A16) H2: Mechanical effect
xtmixed enlp_cst d_seat enep_cst_o if iso == 620 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A9: Replication of model (2) in main text inclusing a lagged dependent variable

*(A17) Reproduction model (2): Stratgic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A18) Strategic voting including lagged dependent variable
xtmixed enep_cst_o party_count l_enep_cst_o c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle


***Table A10: Replication of model (2) from main text using a cleavage index based exclusively on survey data

*(A19) Reproduction model (2): strategic voting
xtmixed enep_cst_o party_count c.d_seat##c.cleavage if num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle

*(A20) Strategic voting: CSES cleavage indicators
xtmixed enep_cst_o party_count c.d_seat##c.cses_cleavage if unique_id!=37 & unique_id!=38 & num_reg == 1 || iso:, covariance(independent) || time:, covariance(independent) mle




